package main

import (
	"fmt"
	"strconv"
)

func main() {
	var nu string
	_, err := fmt.Scanln(&nu)
	if err != nil {
		return
	}
	re := 0
	i, _ := strconv.Atoi(nu)
	for i != 0 {
		re = re*10 + i%10
		i = i / 10
	}
	fmt.Println(re)
}
